# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kcachegrind
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/development/org.kde.kcachegrind"
pkgdesc="A profile data visualization tool, used to determine the most time consuming parts in the execution of a program"
license="GPL-2.0-only AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	karchive5-dev
	kconfig5-dev
	kcoreaddons5-dev
	kdbusaddons5-dev
	kdoctools5-dev
	ki18n5-dev
	kio5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	qt5-qttools-dev
	samurai
	"
_repo_url="https://invent.kde.org/sdk/kcachegrind.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kcachegrind-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
44dd42cf3e89202d9a0410102886b48a364f91832f3272edd7a5498df9c3d60469915398a31d6d506ac6116aeb5fcf5246e5f30f16ae3e27e68ad8ee7e17dc05  kcachegrind-23.08.4.tar.xz
"
